<?php


namespace app\model;


class BannerModel extends BaseModel
{
    protected $table = 'forum_banner';
    protected $hidden = ['delete_time'];

    public function img(): \think\model\relation\HasMany
    {
        return $this->hasMany(ImageModel::class, 'id', 'img_id');
    }

    public function bannerImage(): \think\model\relation\HasOne
    {
        return $this->hasOne(ImageModel::class, 'id', 'img_id');
    }

}